<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        body{
            font: 12px "simhei", Arial, Helvetica, sans-serif;
        }
        div{
            width: 198px;height: 233px;
            background-color: #e8e8e8;
            /*让元素里面的文本/行内元素/行内块元素居中*/
            text-align: center;
        }
        p{margin: 0}
        .title_p{
            font-size: 12px;
            margin-bottom: 6px;
            text-align: center;

        }
        .price_p{
            font-size: 12px;
            margin-bottom: 6px;
            color: #0aa1ed;
            font-weight: bold;
            text-align: center;
        }
        a{
            width: 100px;
            height: 24px;
            background-color: #0aa1ed;

            text-align: center;
            line-height: 24px;
            color: white;
            text-decoration: none;
            border-radius: 2px;
            font-size: 12px;
            /*display: block;*/
            /*块级元素居中通过外边距*/
            /*margin: 0 auto;*/
            display:inline-block;
            /*行内或行内块元素居中,需要给上级元素添加text-align:center*/

        }
    </style>
</head>
<body>
<div>
  <img src="https://doc.codeboy.com/tstore_v1/images/itemCat/study_computer_img3.png">
  <p class="title_p">戴尔(DELL)XPS13-9360-R1609 13.3英寸微边框笔记本电脑</p>
  <p class="price_p">￥4600.00</p>
  <a href="">查看详情</a>
</div>
</body>
</html>